<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common.jsp"%>
<!-- 分页表单：搜索表单必须添加属性： rel="pagerForm"  -->
<%@include file="/pageParameter.jsp" %>
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="${ctxPath }/drp/drpSupplier/list"
		method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
				    <td>名称： <input type="text" name="name" value="${entity.name}" /></td>
                    <td>
						<div class="buttonActive">
							<div class="buttonContent">
							     <button title="查询" type="submit">查&nbsp;询</button>
							</div>
						</div>
					</td>
                 </tr>
			</table>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
				<shiro:hasPermission name="drp/drpSupplier/add">
					<li>
						<a title="添加" class="add"
							href="${ctxPath }/drp/drpSupplier/addUI" target="dialog" 
							mask="true" width="750" height="500" rel="input" ><span>添加</span>
						</a>
					</li>
					<li class="line">line</li>
				</shiro:hasPermission>
				<shiro:hasPermission name="drp/drpSupplier/edit"> 
					<li>
						<a title="修改" class="edit" target="dialog"
							href="${ctxPath}/drp/drpSupplier/editUI?id={param_id}" 
							warn="请选择要操作的数据"
						 	mask="true" width="550" height="600"><span>修改</span></a>
					</li>
					<li class="line">line</li>
				</shiro:hasPermission>
				<shiro:hasPermission name="drp/drpSupplier/delete">	
					<li>
						<a title="确定要删除该记录吗？" class="delete"  target="ajaxTodo"
							href="${ctxPath}/drp/drpSupplier/delete?id={param_id}" 
							warn="请选择要操作的数据"><span>删除</span></a>
					</li>
					<li class="line">line</li>
				</shiro:hasPermission>	
		</ul>
	</div>
	<table class="table" width="101%" layoutH="109">
		<thead>
			<tr>
				<th width="5%" >序号</th>
				<th width="10%" orderField="name" class="${pageParam.orderField eq 'name' ? pageParam.orderDirection : ''}">名称</th>
				<th width="10%" orderField="contacter" class="${pageParam.orderField eq 'contacter' ? pageParam.orderDirection : ''}">联系人</th>
				<th width="5%" orderField="mobilePhone" class="${pageParam.orderField eq 'mobilePhone' ? pageParam.orderDirection : ''}">手机号码</th>
				<th width="5%" orderField="telephone" class="${pageParam.orderField eq 'telephone' ? pageParam.orderDirection : ''}">电话号码</th>
				<th width="15%" orderField="email" class="${pageParam.orderField eq 'email' ? pageParam.orderDirection : ''}">邮箱地址</th>
				<th width="5%" orderField="wangNumber" class="${pageParam.orderField eq 'wangNumber' ? pageParam.orderDirection : ''}">旺旺号</th>
				<th width="10%" orderField="startTime" class="${pageParam.orderField eq 'startTime' ? pageParam.orderDirection : ''}">开始合作时间</th>
				<th width="10%" orderField="endTime" class="${pageParam.orderField eq 'endTime' ? pageParam.orderDirection : ''}">结束合作时间</th>
				<th width="10%" orderField="createTime" class="${pageParam.orderField eq 'createTime' ? pageParam.orderDirection : ''}">创建时间</th>
				<th width="5%">地址</th>
				<th width="8%">备注</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="item" items="${pageBean.recordList}" varStatus="s">
				<!-- 
				当选中一行时,tr上的rel值会自动替换到url变量中.
				注意url变量名{sid_user}和tr的target="sid_user"保持一致.
				 -->
				<tr target="param_id" rel="${item.id}">
					<td>${s.index + 1}</td>
					<td>${item.name}</td>
					<td>${item.contacter}</td>
					<td>${item.mobilePhone}</td>
					<td>${item.telephone}</td>
					<td>${item.email}</td>
					<td>${item.wangNumber}</td>
					<td><fmt:formatDate value="${item.startTime}" pattern="yyyy-MM-dd" /></td>
			        <td><fmt:formatDate value="${item.endTime}" pattern="yyyy-MM-dd" /></td>
					<td><fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd" /></td>
			        <td>${item.address}</td>
			        <td>${item.remark}</td>
				</tr>
			</c:forEach>
			<c:if test="${pageBean.totalCount==0}"><tr><td>暂无数据</td></tr></c:if>
		</tbody>
	</table>
	<%@include file="/pageBar.jsp" %>
</div>
